<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>this的面试题</title>
  </head>
  <body>
    <script>
      var length = 10;

      function fn() {
        console.log(this.length);
      }

      var obj = {
        length: 5,
        method: function (fn) {
          fn();
          arguments[0]();
        },
      };

      obj.method(fn);
    </script>
  </body>
</html>
